<template>
    <div>
      <p>每次增加1:<button @click="counter.increment()">+</button> 数字: {{ counter.count }}</p>
      <p>每次减少1:<button @click="counter.decrement()">-</button> 数字: {{ counter.maxCount }}</p>
    </div>
  </template>
  
  <script>
  import { useCounterStore } from './store/index';
  
  export default {
    name: 'Counter',
    setup() {
      const counter = useCounterStore();
  
      return {
        counter,
      };
    },
  };
  </script>
  <style scoped>
  button{
      background-color: aqua;
      border-radius: 22%;
      border: 0;
  }
  </style>